package demo1;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        TreeNode root = binaryTree.createBinaryTree();
        System.out.println(binaryTree.size(root));
       // binaryTree.leafSize(root);
        binaryTree.getLeafNodeCount(root);
        System.out.println(binaryTree.leftCount);
        System.out.println(binaryTree.getLeafNodeCount1(root));
        System.out.println(binaryTree.getKLevelNodeCount(root, 4));
        System.out.println(binaryTree.getHeight(root));

        try {
            TreeNode findNode = binaryTree.find(root,'E');
            System.out.println(findNode.val);
        }catch (NullPointerException e) {
            e.printStackTrace();
            System.out.println("没有这个节点");
        }

        System.out.println(binaryTree.isCompleteTree(root));

    }
}
